//
//  ViewController.m
//  11-20
//
//  Created by mac on 15-11-20.
//  Copyright (c) 2015年 ztt. All rights reserved.
//

#import "ViewController.h"
#import "inputViewController.h"
@interface ViewController ()<UIActionSheetDelegate,UIActivityItemSource>

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.title = @"通讯录";
    NSLog(@"视图完成加载");
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell * cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
    cell.textLabel.text = @"通讯录";
    cell.detailTextLabel.text = @"具体内容";
    cell.imageView.image = [UIImage imageNamed:@"tu@2x.png"];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    inputViewController * con = [[inputViewController alloc] initWithStyle:UITableViewStylePlain];
    UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
    con.tel = cell.detailTextLabel.text;
    [self.navigationController pushViewController:con animated:YES];
}

- (void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    NSLog(@"视图已经显示");
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    NSLog(@"视图即将消失");
}

- (void)viewDidDisappear:(BOOL)animated{
    [super viewDidDisappear:animated];
    NSLog(@"视图已经消失");
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    NSLog(@"你触摸了屏幕");
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
